package com.hunk.core.entity;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * 
 * @Author Dylan
 * @Project shpam
 * @Version V1.0
 * @Date 2011-6-8 下午04:31:10
 */
@MappedSuperclass
public abstract class IdentityIdEntity implements IdEntity<Long> {
	
	private static final long serialVersionUID = -2355831311829772194L;
	@Id
	/**
	 * modify me if use other database type.
	 */
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	// @GeneratedValue(strategy = GenerationType.SEQUENCE)
	// @GeneratedValue(generator = "system-uuid")
	// @GenericGenerator(name = "system-uuid", strategy = "uuid")
	protected Long id;

	@Override
	public Long getId() {
		return id;
	}

	@Override
	public void setId(Long id) {
		this.id = id;
	}

}
